package total;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Ques1773 {
	public void go(){
		Scanner scan = new Scanner(System.in);
		int n,temp;
		Map<Integer,Integer> map = new HashMap<>();
		while(scan.hasNext()){
			n = scan.nextInt();
			for (int i = 0; i < n; i++) {
				temp = scan.nextInt();
				if(map.containsKey(temp)){
					map.replace(temp, map.get(temp), map.get(temp)+1);
				}else{
					map.put(temp, 1);
				}
			}
			for(Map.Entry<Integer, Integer> entry : map.entrySet()){
				if(entry.getValue() > n / 2){
					System.out.println(entry.getValue());
				}
			}
		}
	}
	
	public static void main(String[] args) {
		new Ques1773().go();
	}
}
